// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

#ifndef Tokenizer_h
#define Tokenizer_h

#include <string>
#include <vector>

//
// Tokenizer
//
// Tokenizes a string
//

class Tokenizer {
 public:
      // Constructor and deconstructor
    Tokenizer();
    ~Tokenizer();

      // Parse a string into a vector of tokens separated by spaces (by default)
      // or any other delimiters
    std::vector<std::string>& parse(std::string&, const std::string& = " ");
      // Parse a string into a vector of at most two tokens
    std::vector<std::string>& parseTwo(std::string&, const std::string& = " ");

 private:
    std::vector<std::string> tokens_;
};

#endif
